
f2=open("/home/zjg/py_test/pyth_test/test1","r",encoding="UTF-8")

test=f2.read()

test=test.replace(" ","")
test=test.replace("，",",")
test=test.replace("。",",")
test=test.replace(".","")

f2=open("/home/zjg/py_test/pyth_test/test","w",encoding="UTF-8")

f2.write(test)
f2.flush()

f1=open("/home/zjg/py_test/pyth_test/bill.txt.bak","a",encoding="UTF-8")


f=open("/home/zjg/py_test/pyth_test/test","r",encoding="UTF-8")

for line in f:
    print(line)
    if line.count("测试"):
        continue
    else:
        f1.write(line)
        # f1.write("\n")

f.close()
f1.close()
f2.close()
